<?php
/**
 * gcFramework
 *
 * Development framework for PHP 5 or newer
 *
 * @package		gcFramework
 * @author		Adam Martin
 * @copyright	Copyright (c) 2006
 * @license		http://www.gcFramework.com/web/license.html
 * @link		http://www.gcFramework.com
 * @since		Version 1.0
 */
 
 //instantiate class
 $datetime = new datetime;
 
 class datetime{
 	
 	
 	/*
	| -------------------------------------------------------------------
	|  valid
	| -------------------------------------------------------------------
	| Checks the validity of the date formed by the arguments. 
	| A date is considered valid if:
	| 1. year is between 1 and 32767 inclusive
	| 2. month is between 1 and 12 inclusive
	| 3. Day is within the allowed number of days for the given month. 
	|    (Leap years are taken into consideration)
	|
	| Example Use:
	|   date->valid($date);
	|	
	*/
 	function valid($date,$format){
 		global $gcvalidate;
 		$gcvalidate->datecheck($date,$format='ymd');
 	}
 	
 	/*
	| -------------------------------------------------------------------
	|  date
	| -------------------------------------------------------------------
	| Returns current local date/time. 
	| Uses php constants 
	|
	| Example Use:
	|   datetime->date($format);
	|	
	*/
 	function date($format){
 		$date = date($format);	
 		return $date;
 	}
 }
 
 
 
?>
